/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package checkers.database;

import checkers.exceptions.EmailNotFoundException;
import checkers.exceptions.EmailNotUniqueException;
import com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException;
import checkers.businessLogic.entity.User;
import java.sql.*;
import java.sql.SQLException;
import java.sql.Date;
import java.util.LinkedList;

/**
 *
 * @author artinshahverdian
 */
public interface IDatabaseUserOperations {

    public void registerUser(User user) throws EmailNotFoundException, SQLException;

    public User getUser(String email, String password) throws SQLException;

    public void updateEmail(String userId, String newEmail) throws SQLException;

    public void updateFirstName(String userId, String firstName) throws SQLException;

    public void updateLastName(String userId, String lastName) throws SQLException;

    public void updateBirthDate(String userId, Date birthDate) throws SQLException;

    public void updateSecurityQuestion(String userId, String securityQuestion) throws SQLException;

    public void updatePassword(String userId, String password) throws SQLException;

    public void updateRating(String userId, int Rating) throws SQLException;

    public void updateSecurityAnswer(String userId, String securityAnswer) throws SQLException;

    public void updateLastLogin(String userId, Timestamp lastLogin) throws SQLException;

    public String getSecurityQuestion(String userId) throws SQLException;

    public String getSecurityAnswer(String userId) throws SQLException;

    public String getPassword(String userId) throws SQLException;

    public String getName(String userId) throws SQLException;

    public Integer getRating(String userId) throws SQLException;

    public Integer getId(String email) throws SQLException;

    public LinkedList<User> getHighRanking() throws SQLException;

    public User getUserById(String UserId) throws SQLException;
}
